﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;

namespace WisdriContacts
{
    public partial class SearchPage : PhoneApplicationPage
    {
        public SearchPage()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            // 如果所选项为空(没有选定内容)，则不执行任何操作
            if (string.IsNullOrWhiteSpace(TextBoxFilter.Text))
                return;

            App.ViewModel.SubTitle = "筛选";

            // 导航到新页面
            NavigationService.Navigate(new Uri("/ContactListPage.xaml?filter=" + TextBoxFilter.Text.Trim(),
                UriKind.Relative));
        }
    }
}